package com.note.es.mapping;

import java.lang.reflect.Field;
import java.util.HashSet;
import java.util.Set;

/**
 * @ClassName: Social
 * @Description: 社交mapping属性
 */
public class Social {
    public final static String ID = "id";//这个是唯一id
    public final static String ATD_CNT = "atdCnt";//点赞数
    public final static String CMT_CNT = "cmtCnt";//评论数
    public final static String FLW_CNT = "flwCnt";//粉丝数
    public final static String FRD_CNT = "frdCnt";//关注数
    public final static String RPS_CNT = "rpsCnt";//转发数
    public final static String STA_CNT = "staCnt";//状态数
    public final static String COUNTRY  = "country";//国家
    public final static String CITY = "city";//城市
    public final static String GENDER = "gender";//性别
    public final static String LANGUAGE_CODE  = "languageCode";//语言代码
    public final static String LOCATION_ID = "locationId";//定位ID
    public final static String NAME = "name";//姓名
    public final static String NICK_NAME = "nickName";//昵称
    public final static String PROVINCE = "province";//省份
    public final static String SENTIMENT_ORIENT = "sentimentOrient";//情感方向
    public final static String SOURCE_TYPE = "sourceType";//来源类型
    public final static String TAG_ID = "tagId";//
    public final static String TIME = "time";
    public final static String TIME_STR = "timeStr";
    public final static String TITLE = "title";//标题
    public final static String TEXT = "text";//文章内容
    public final static String URL = "url";//链接
    public final static String USER_AVATAR = "userAvatar";//用户替身？
    public final static String USER_TAG = "userTag";
    public final static String USER_TYPE = "userType";//用户类型
    public final static String VERIFIED = "verified";//核实？
    public final static String VIEW = "view";//观点
    public final static String IS_WARNING = "isWarning";//是否预警
    public final static String TOPIC_TYPE = "topicType";//专题类型
    public final static String KEYWORDS = "keywords";//关键字
    public final static String TOPIC_ID = "topicId";//专题id

    private static Set<String> fields;

    static {
        try {
            fields = new HashSet<>();
            Field[] clazzFields = Social.class.getFields();
            for (Field clazzField : clazzFields) {
                fields.add(String.valueOf(clazzField.get(null)));
            }
        } catch (IllegalAccessException e) {
            e.printStackTrace();
        }
    }

    public static Set<String> getFields() {
        return fields;
    }
}
